package dataTypes;

public class ArrayPractise {
	
	
	public ArrayPractise()
	{
		
		//there are 4 steps to start using array
		//declare
		//create
		//initialise
		//using or accesing
		
		int[] num , num2 ; //this is one way of declaring.this is used when we declare multiple arrays
		int num1[] ; //this is other way of declaring
		
		//num = {1,2,3 4} ; //this is wrong way of instatiation
		
		num = new int[10] ; //this is creating an array ;
							//memory is allocated now
		
		for(int i = 0 ; i < 10 ; i++  )
		{
			num[i] = i ; //instantiation of array
		}
		
		num2 = new int[]{1, 2,3,4} ; //rhs is called anonymous array
		
		int[] num4 = {1,2,3,4,5} ;
		
		
	}
	
	

}
